<?php


namespace app\common\tool;


use think\facade\Cache;

class RedisClient
{
    protected static $handle;

    // 获得redis实例
    public static function get_redis()
    {
        if (!empty(self::$handle)) {
            return self::$handle;
        }
        $res = Cache::init();
        self::$handle = $res->handler();
        return self::$handle;
    }

}